Denizen Script Language Explanations


Language Explanations explain components of Denizen in a more direct and technical way than The Beginner's Guide.


Showing 1 out of 56 language explanations...
NameSlider GUI Element
DescriptionSliders allow controlling a number (integer) value, with a customizable min/max values; they have a UI type of "slider".


ui_type: slider
# The minimum value the slider can hold, optional (defaults to 0).
min: <number>
# The maximum value the slider can hold, required.
max: <number>
# The axis the slider slides along, required.
axis: HORIZONTAL/VERTICAL
# The direction the slider slides in along its axis to increase its value, optional.
# Defaults to UP for vertical sliders, and RIGHT for horizontal sliders.
# Note that the direction must match the axis, UP/DOWN for VERTICAL, and LEFT/RIGHT for HORIZONTAL.
direction: UP/DOWN/LEFT/RIGHT
# The value the slider should be on, optional.
value: <number>
# Code to run when the slider's value is changed in the slightest (each number it goes through while dragging), optional.
# Provides <context.new_value>, returning an ElementTag(Number) of the slider's new value.
# Should generally prefer listening to the final value set instead of this.
on_change:
- <script>
# Code to run when the slider's value is set (the user finished changing it), optional.
# Provides <context.new_value>, returning an ElementTag(Number) of the slider's new value.
on_set:
- <script>
GroupGUI System
Sourcehttps://github.com/DenizenScript/Clientizen/blob/master/src/main/java/com/denizenscript/clientizen/scripts/containers/gui/elements/SliderElement.java#L30